<extend name="Public/common"/>

<block name="content">
<!--轮播-->
<div class="swiper-container swiper-container1">
    <div class="swiper-wrapper swiper-wrapper1">
       <foreach name="banner" item="vv">
	        <div class="swiper-slide swiper-slide1">
	            <a href="{$vv.ad_link}" width='100%' height="260"><img src="{$vv.pic_url}" alt=""/></a>
	        </div>
        </foreach>
    </div>
    <!--进度条-->
    <div class="swiper-pagination"></div>
    <!--左右箭头-->
    <!--<div class="swiper-button-next"></div>-->
    <!--<div class="swiper-button-prev"></div>-->
</div>
<!--首页选项卡-->
<div class="TabHost">
    <div class="TabHost_first <if condition="empty($_GET['class_id'])">index_color</if>" onclick="javascript:location.href='{:U('Index/index')}'">首页</div>
    <foreach name="nav_data" key='key' item="value">
  		<div class="TabHost_lirst <if condition="$value['id'] == $_GET['class_id']">index_color</if>" onclick="javascript:location.href='{:U('findClass', array('class_id' => $value['id']))}'">{$value.class_name}</div>
  	</foreach>
</div>
<!--分类-->
<div class="Classification">
    <div class="Classification_first">
        <foreach name="result_class" key="key" item="value">
        	<if condition="!empty($value)">
		        <div class="Classification_first_on">
		            <div class="Classification_first_on_img">
		               <a href="{:U('index', array('class_id'=> $value['id']))}"><img src="{$value.pic_url}" alt="" width="50" height="32"/></a>
		            </div>
		            <div class="Classification_first_on_two">
		              <a href="{:U('index', array('class_id'=> $value['id']))}">{$value.class_name}</a>
		            </div>
		        </div>
		     </if>
	     </foreach>
   </div>
</div>
<!--分割线-->
<div class="Cutting_line"></div>
<if condition ="!empty($product)">
	<foreach name="product" key="key" item="value">
		<!--奶粉纸尿片-->
		<div class="Milk_powder">
		    <div class="Milk_powder_first"> {$value.class_name}</div>
		    <div class="Milk_powder_lirst">
		        <a href="{:U('Goods/goods_goodslist', array('class_id'=> $value['id']))}">更多 ></a>
		    </div>
		</div>
		<!--奶粉纸尿片_图片-->
		<div class="Milk_img">
			<foreach name="value.product" key="good" item="pro">
		        <div class="Milk_img_first">
		            <div class="Milk_img_first_on"> <a href="{:U('Goods/goods_goods', array('id'=> $pro['id']))}"><img src="{$pro.pic_url}" alt=""/></a> </div>
		            <div class="Milk_img_first_two"> {$pro.title} </div>
		            <div class="Milk_img_first_san"> {$pro.description}</div>
		            <div class="Milk_img_first_si">￥{$pro.price_old}</div>
		        </div>
		    </foreach>
		</div>
		<!--分割线-->
		<if condition="($key+1) % 2 ==0">
			<div class="Cutting_line"></div>
			<!--分割图-->
			<div class="Cutting_img"> 
				<php>$ad_data = 'ad_'.($key+1);</php>
				<volist name="$ad_data" id="adInfo">
					<a href="{$adInfo.ad_link}"><img alt="{$adInfo.title}"  width="400" height="126" src="{$adInfo.pic_url}"></a>
				</volist>
			</div>
			<!--分割线-->
			<div class="Cutting_line"></div>
		</if>
	</foreach>
</if>
</block>

